<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>参数配置编辑</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="/web/res/css/xadmin.css">
    <link rel="stylesheet" href="/web/res/wangEditor/wangEditor.css">

    <script src="/web/res/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/web/res/js/xadmin.js"></script>
</head>

<body style="background-color: white;">
<div class="layui-fluid" id="orderEdit">
    <form class="layui-form layui-form-pane" id="formsubmit" style="width: 600px;margin:20px auto;text-align: center"
          action="/after/setup/saveOrUpdate">

        <input type="hidden" id="id" name="id" value="${(byId.id?c)!''}">
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">用户实名认证上级返利钻石(个)</label>
            <div class="layui-input-inline">
                <input type="number" id="renzhengfanli" name="renzhengfanli" oninput="if(value < 0 )value = 0"
                       value="${byId.renzhengfanli!''}" required lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <input type="hidden" id="dashanmoney" name="dashanmoney" value="0">
        <input type="hidden" id="dashanimg" name="dashanimg" value="${byId.dashanimg!''}">
        <input type="hidden" id="dashantext" name="dashantext" value="${byId.dashantext!''}">

        <!-- <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">搭讪成功奖励钻石(个)</label>
            <div class="layui-input-inline">
                <input type="number" id="dashanmoney"  name="dashanmoney" oninput="if(value < 0 )value = 0" value="${byId.dashanmoney!''}"  required lay-verify="required"
                       autocomplete="off" class="layui-input" />
            </div>
        </div> -->
        <!-- <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">搭讪礼物图片地址</label>
            <div class="layui-input-inline">
                <input type="text" id="dashanimg"  name="dashanimg" value="${byId.dashanimg!''}"  required lay-verify="required"
                       autocomplete="off" class="layui-input" />
            </div>
        </div> -->
        <!-- <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">搭讪语</label>
            <div class="layui-input-inline">
                <input type="text" id="dashantext"  name="dashantext" value="${byId.dashantext!''}"  required lay-verify="required"
                       autocomplete="off" class="layui-input" />
            </div>
        </div> -->
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">开通贵族给上级返利比例(%)</label>
            <div class="layui-input-inline">
                <input type="number" id="guizufanli" name="guizufanli" oninput="if(value < 0 )value = 0"
                       value="${byId.guizufanli!''}" required lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">钻石充值比例 1:${byId.rechargeratio!''}</label>
            <div class="layui-input-inline">
                <input type="number" id="rechargeratio" name="rechargeratio" oninput="if(value < 0 )value = 0"
                       value="${byId.rechargeratio!''}" required lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">钻石兑换金币的比例
                1:${byId.jinDouExchangeForDiamonds!''}</label>
            <div class="layui-input-inline">
                <input type="number" id="jinDouExchangeForDiamonds" name="jinDouExchangeForDiamonds"
                       value="${byId.jinDouExchangeForDiamonds!''}" required
                       lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <!--<div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">刷礼物主播占比分成(%)</label>
            <div class="layui-input-inline">
                <input type="number" id="giftSharing" name="giftSharing" oninput="if(value < 0 )value = 0"
                       value="${byId.giftSharing!''}" required lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">单次提现金币最高数量</label>
            <div class="layui-input-inline">
                <input type="text" id="jindouAndWihdrawalMaxL" name="jindouAndWihdrawalMaxL" oninput="if(value < 0 )value = 0"
                       value="${byId.jindouAndWihdrawalMaxL?c!''}" required lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">提现抽成比例(%)</label>
            <div class="layui-input-inline">
                <input type="number" id="withdrawalratio" name="withdrawalratio" oninput="if(value < 0 )value = 0"
                       value="${byId.withdrawalratio!''}" required lay-verify="required"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 350px;">提现开关</label>
            <div class="layui-input-inline">
                <select name="withdrawal" id="withdrawal" lay-filter="typeone" lay-verify="required"
                        style="margin: 0;">
                    <option value="1"
                    <#if byId?exists && byId.withdrawal?exists><#if (byId.withdrawal)?number == 1?number>selected</#if>
            </#if>>开启</option>
            <option value="2"
            <#if byId?exists && byId.withdrawal?exists><#if (byId.withdrawal)?number == 2?number>selected
        </#if>
    </#if>>关闭</option>
    </select>
</div>
</div>
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label" style="width: 350px;">1V1音视频前判断持有最低钻石数量(个)</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input type="number" id="videoMin"  name="videoMin" oninput="if(value < 0 )value = 0" value="${(byId.videoMin?c)!''}"  required lay-verify="required"-->
<!--                       autocomplete="off" class="layui-input" />-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label" style="width: 350px;">1v1视频用户每分钟消耗钻石(个)</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input type="number" id="videomoney"  name="videomoney" oninput="if(value < 0 )value = 0" value="${(byId.videomoney?c)!''}"  required lay-verify="required"-->
<!--                       autocomplete="off" class="layui-input" />-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label" style="width: 350px;">1v1视频主播每分钟返利钻石(个)</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input type="number" id="videofanli"  name="videofanli" oninput="if(value < 0 )value = 0" value="${(byId.videofanli?c)!''}"  required lay-verify="required"-->
<!--                       autocomplete="off" class="layui-input" />-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label" style="width: 350px;">1v1音频用户每分钟消耗钻石(个)</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input type="number" id="yinpinmoney"  name="yinpinmoney" oninput="if(value < 0 )value = 0" value="${(byId.yinpinmoney?c)!''}"  required lay-verify="required"-->
<!--                       autocomplete="off" class="layui-input" />-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label" style="width: 350px;">1v1音频主播每分钟返利钻石(个)</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input type="number" id="yinpinfanli"  name="yinpinfanli" oninput="if(value < 0 )value = 0" value="${(byId.yinpinfanli?c)!''}"  required lay-verify="required"-->
<!--                       autocomplete="off" class="layui-input" />-->
<!--            </div>-->
<!--        </div>-->
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">创建家族消耗钻石数量(个)</label>
    <div class="layui-input-inline">
        <input type="number" id="createFamilyForDiamonds" name="createFamilyForDiamonds"
               oninput="if(value < 0 )value = 0" value="${byId.createFamilyForDiamonds?c!''}" required
               lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">退出家族不可再加入家族时间天数限制(天)</label>
    <div class="layui-input-inline">
        <input type="number" id="quitFamilyForDay" name="quitFamilyForDay" oninput="if(value < 0 )value = 0"
               value="${byId.quitFamilyForDay?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">家族签到奖励金币数量</label>
    <div class="layui-input-inline">
        <input type="number" id="punchInFamilyWard" name="punchInFamilyWard" oninput="if(value < 0 )value = 0"
               value="${byId.punchInFamilyWard?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">家族签到增加家族威望数量</label>
    <div class="layui-input-inline">
        <input type="number" id="punchInFamilyPrestige" name="punchInFamilyPrestige" oninput="if(value < 0 )value = 0"
               value="${byId.punchInFamilyPrestige?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">送礼增加家族威望数量</label>
    <div class="layui-input-inline">
        <input type="number" id="songliFamilyPrestige" name="songliFamilyPrestige" oninput="if(value < 0 )value = 0"
               value="${byId.songliFamilyPrestige?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>


<!--<div class="layui-form-item">-->
<!--    <label class="layui-form-label" style="width: 350px;">收费设置说明</label>-->
<!--    <div class="layui-input-inline">-->
<!--        <input type="text" id="priceSetExplain" name="priceSetExplain" oninput="if(value < 0 )value = 0"-->
<!--               value="${byId.priceSetExplain!''}" required lay-verify="required"-->
<!--               autocomplete="off" class="layui-input"/>-->
<!--    </div>-->
<!--</div>-->
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">真人认证分数</label>
    <div class="layui-input-inline">
        <input type="number" id="faceCompScore" name="faceCompScore" oninput="if(value < 0 )value = 0"
               value="${byId.faceCompScore?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">亲密度守护值，大于该值成为守护</label>
    <div class="layui-input-inline">
        <input type="number" id="intimacyGuard" name="intimacyGuard" oninput="if(value < 0 )value = 0"
               value="${byId.intimacyGuard?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">亲密度大于该值展示在守护列表中</label>
    <div class="layui-input-inline">
        <input type="number" id="minIntimacyShow" name="minIntimacyShow" oninput="if(value < 0 )value = 0"
               value="${byId.minIntimacyShow?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">亲密度兑换钻石比例，如1钻石=0.1亲密度</label>
    <div class="layui-input-inline">
        <input type="number" id="intimacyZuanshi" name="intimacyZuanshi" oninput="if(value < 0 )value = 0"
               value="${byId.intimacyZuanshi?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">顶替守护金额增加百分比，如10%，填写0.1</label>
    <div class="layui-input-inline">
        <input type="number" id="guardZeng" name="guardZeng" oninput="if(value < 0 )value = 0"
               value="${byId.guardZeng?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">每条聊天消息增加魅力值数量</label>
    <div class="layui-input-inline">
        <input type="number" id="eachMessageCharmGrowth" name="eachMessageCharmGrowth" oninput="if(value < 0 )value = 0"
               value="${byId.eachMessageCharmGrowth?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>

<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">钻石礼物与魅力值增长比例,如1钻石=0.1魅力值</label>
    <div class="layui-input-inline">
        <input type="number" id="diamondsToCharmGrowth" name="diamondsToCharmGrowth" oninput="if(value < 0 )value = 0"
               value="${byId.diamondsToCharmGrowth!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>

<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">同城速配消耗钻石数量(每人)</label>
    <div class="layui-input-inline">
        <input type="number" id="sameCityForDiamonds" name="sameCityForDiamonds" oninput="if(value < 0 )value = 0"
               value="${byId.sameCityForDiamonds?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">语音签名点赞增加魅力值数量</label>
    <div class="layui-input-inline">
        <input type="number" id="voiceSignatureParseGrowth" name="voiceSignatureParseGrowth"
               oninput="if(value < 0 )value = 0" value="${byId.voiceSignatureParseGrowth?c!''}" required
               lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">动态每天被点赞赠送魅力值次数上限</label>
    <div class="layui-input-inline">
        <input type="number" id="dynamicParseEveryDayMax" name="dynamicParseEveryDayMax"
               oninput="if(value < 0 )value = 0" value="${byId.dynamicParseEveryDayMax?c!''}" required
               lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">动态每次被点赞增加魅力值数量</label>
    <div class="layui-input-inline">
        <input type="number" id="dynamicParseCharmGrowth" name="dynamicParseCharmGrowth"
               oninput="if(value < 0 )value = 0" value="${byId.dynamicParseCharmGrowth?c!''}" required
               lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">语音视频每分钟增加魅力值数量</label>
    <div class="layui-input-inline">
        <input type="number" id="voiceAndVideoEveryMinuteCharmGrowth" name="voiceAndVideoEveryMinuteCharmGrowth"
               oninput="if(value < 0 )value = 0" value="${byId.voiceAndVideoEveryMinuteCharmGrowth?c!''}" required
               lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">超出该时间未增加亲密度则降低亲密度(小时)</label>
    <div class="layui-input-inline">
        <input type="number" id="decIntimacyForHours" name="decIntimacyForHours" oninput="if(value < 0 )value = 0"
               value="${byId.decIntimacyForHours?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">降低亲密度数量</label>
    <div class="layui-input-inline">
        <input type="number" id="decIntimacyForNum" name="decIntimacyForNum" oninput="if(value < 0 )value = 0"
               value="${byId.decIntimacyForNum?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">亲密度超出该值不下降</label>
    <div class="layui-input-inline">
        <input type="number" id="maxintimacy" name="maxintimacy" oninput="if(value < 0 )value = 0"
               value="${byId.maxintimacy?c!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">邀请的用户充值提成比例</label>
    <div class="layui-input-inline">
        <input type="number" id="rechargeInvite" name="rechargeInvite" oninput="if(value < 0 )value = 0"
               value="${byId.rechargeInvite!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">邀请的用户礼物收益提成比例</label>
    <div class="layui-input-inline">
        <input type="number" id="giftInvite" name="giftInvite" oninput="if(value < 0 )value = 0"
               value="${byId.giftInvite!''}" required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">一个IP一天注册账号个数</label>
    <div class="layui-input-inline">
        <input type="number" id="ipnumber" name="ipnumber" oninput="if(value < 0 )value = 0" value="${byId.ipnumber?c!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">直播认证开关</label>
    <div class="layui-input-inline">
        <select name="liveManage" id="liveManage" lay-filter="typeone" lay-verify="required"
                style="margin: 0;">
            <option value="1"
            <#if byId?exists && byId.liveManage?exists><#if (byId.liveManage)?number == 1?number>selected</#if>
    </#if>>开启</option>
    <option value="2"
    <#if byId?exists && byId.liveManage?exists><#if (byId.liveManage)?number == 2?number>selected</#if>
</#if>>关闭</option>
</select>
</div>
</div>

<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">语音匹配价格</label>
    <div class="layui-input-inline">
        <input type="number" id="voiceMatch" name="voiceMatch" oninput="if(value < 0 )value = 0" value="${byId.voiceMatch?c!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">视频匹配价格</label>
    <div class="layui-input-inline">
        <input type="number" id="videoMatch" name="videoMatch" oninput="if(value < 0 )value = 0" value="${byId.videoMatch?c!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">邀请用户注册赠送钻石数量</label>
    <div class="layui-input-inline">
        <input type="number" id="subordinatereward" name="subordinatereward" oninput="if(value < 0 )value = 0" value="${byId.subordinatereward?c!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">亲密度达到多少可以语音视频通话</label>
    <div class="layui-input-inline">
        <input type="number" id="intimacyvoice" name="intimacyvoice" oninput="if(value < 0 )value = 0" value="${byId.intimacyvoice?c!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">亲密度达到多少语音视频聊天免费</label>
    <div class="layui-input-inline">
        <input type="number" id="intimacyfreevoice" name="intimacyfreevoice" oninput="if(value < 0 )value = 0" value="${byId.intimacyfreevoice?c!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>

<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">客服</label>
    <div class="layui-input-inline">
        <input type="text" id="kefuUrl" name="kefuUrl"  value="${byId.kefuUrl!''}"
               required lay-verify="required"
               autocomplete="off" class="layui-input"/>
    </div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label" style="width: 350px;">VIP开关</label>
    <div class="layui-input-inline">
        <select name="vipManage" id="vipManage" lay-filter="typeone" lay-verify="required"
                style="margin: 0;">
            <option value="1"<#if byId?exists && byId.vipManage?exists><#if (byId.vipManage)?number == 1?number>selected</#if></#if>>开启</option>
            <option value="2"<#if byId?exists && byId.vipManage?exists><#if (byId.vipManage)?number == 2?number>selected</#if></#if>>关闭</option>
        </select>
     </div>
</div>

<!--<div class="layui-form-item">-->
<!--    <label class="layui-form-label" style="width: 350px;">VIP开关（true开 false关）</label>-->
<!--    <div class="layui-input-inline">-->
<!--        <input type="text" id="vipFlag" name="vipFlag"  value="${byId.vipFlag!''}"-->
<!--               required lay-verify="required"-->
<!--               autocomplete="off" class="layui-input"/>-->
<!--    </div>-->
<!--</div>-->

<!--<div class="layui-form-item">-->
<!--    <label class="layui-form-label" style="width: 350px;">七牛云OSS域名</label>-->
<!--    <div class="layui-input-inline">-->
<!--        <input type="text" id="ossurl" name="ossurl" value="${byId.ossurl!''}" required lay-verify="required"-->
<!--               autocomplete="off" class="layui-input"/>-->
<!--    </div>-->
<!--</div>-->
<div class="layui-form-item">
    <div class="layui-input-block">
        <button type="button" class="layui-btn layui-btn-radius" lay-submit lay-filter="save">&emsp;确认&emsp;
        </button>
        <button type="button" class="layui-btn layui-btn-primary layui-btn-radius" onclick="xadmin.close()">
            &emsp;返回&emsp;
        </button>
    </div>
</div>

</form>
</div>
<script type="text/javascript" src="/web/res/wangEditor/wangEditor.js"></script>
<script>
    layui.use(['form', 'upload'], function () {
        let $ = layui.$;
        var form = layui.form;
        var upload = layui.upload;
        form.render();

        $.fn.extend({
            serializeObject: function () {
                var obj = {}; //声明一个对象
                $.each(this.serializeArray(), function (index, field) {
                    obj[field.name] = field.value; //通过变量，将属性值，属性一起放到对象中
                })
                return obj;
            }
        });

        //  单文件上传
        upload.render({
            elem: '#test5'
            , url: '/after/gift/uploadLiveImg'
            , accept: 'file'
            //, acceptMime: '.xlsx,.xls,.csv'//筛选指定后缀文件
            , choose: function (obj) {
                obj.preview(function (index, file, result) {
                    $('#specialeffect').val(file.name)
                });
            }
            , before: function (obj) {
                layer.load();
            }
            , done: function (res) {
                console.log(res);
                $("#specialeffects").val(res.data.name);
                layer.closeAll('loading');
                layer.msg('上传成功');
            }
        });

        $(function () {
            $('#saudiw img').on('click', function () {
                layer.photos({
                    photos: '#saudiw',
                    shadeClose: false,
                    closeBtn: 2,
                    anim: 0
                });
            })
        });
        form.on('submit(' + $("button[lay-submit]:eq(0)").attr("lay-filter") + ')', function (data) {
            if ($("#giftid").val() === '') {
                layer.msg("请选择礼物", {icon: 2, time: 1000}, function () {
                });
                return false;
            }
            layer.confirm('确认要保存吗？', function (index) {
                ajaxPost(layui.$, $("#formsubmit").attr("action"), {
                    "renzhengfanli": $("#renzhengfanli").val(),
                    "dashanmoney": $("#dashanmoney").val(),
                    "dashanimg": $("#dashanimg").val(),
                    "dashantext": $("#dashantext").val(),
                    "guizufanli": $("#guizufanli").val(),
                    "rechargeratio": $("#rechargeratio").val(),
                    "jinDouExchangeForDiamonds": $("#jinDouExchangeForDiamonds").val(),
                    "jindouAndWihdrawalMaxL": $("#jindouAndWihdrawalMaxL").val(),
                    "withdrawalratio": $("#withdrawalratio").val(),
                    "withdrawal": $('#withdrawal').val(),
                    "videoMin": $('#videoMin').val(),
                    "videomoney": $('#videomoney').val(),
                    "videofanli": $('#videofanli').val(),
                    "yinpinmoney": $('#yinpinmoney').val(),
                    "yinpinfanli": $('#yinpinfanli').val(),
                    "ipnumber": $('#ipnumber').val(),
                    "liveManage": $('#liveManage').val(),
                    // "ossurl": $('#ossurl').val(),
                    "createFamilyForDiamonds": $('#createFamilyForDiamonds').val(),
                    "quitFamilyForDay": $('#quitFamilyForDay').val(),
                    "punchInFamilyWard": $('#punchInFamilyWard').val(),
                    "punchInFamilyPrestige": $('#punchInFamilyPrestige').val(),
                    "songliFamilyPrestige": $('#songliFamilyPrestige').val(),
                    "shouliFamilyPrestige": $('#shouliFamilyPrestige').val(),
                    "priceSetExplain": $('#priceSetExplain').val(),
                    "faceCompScore": $('#faceCompScore').val(),
                    "intimacyGuard": $('#intimacyGuard').val(),
                    "intimacyZuanshi": $('#intimacyZuanshi').val(),
                    "minIntimacyShow":$('#minIntimacyShow').val(),
                    "guardZeng": $('#guardZeng').val(),
                    "eachMessageCharmGrowth": $('#eachMessageCharmGrowth').val(),
                    "diamondsToCharmGrowth": $('#diamondsToCharmGrowth').val(),
                    "sameCityForDiamonds": $('#sameCityForDiamonds').val(),
                    "voiceSignatureParseGrowth": $('#voiceSignatureParseGrowth').val(),
                    "dynamicParseEveryDayMax": $('#dynamicParseEveryDayMax').val(),
                    "dynamicParseCharmGrowth": $('#dynamicParseCharmGrowth').val(),
                    "voiceAndVideoEveryMinuteCharmGrowth": $('#voiceAndVideoEveryMinuteCharmGrowth').val(),
                    "decIntimacyForHours": $('#decIntimacyForHours').val(),
                    "decIntimacyForNum": $('#decIntimacyForNum').val(),
                    "maxintimacy": $('#maxintimacy').val(),
                    "voiceMatch": $('#voiceMatch').val(),
                    "videoMatch": $('#videoMatch').val(),
                    "subordinatereward": $('#subordinatereward').val(),
                    "intimacyvoice": $('#intimacyvoice').val(),
                    "intimacyfreevoice": $('#intimacyfreevoice').val(),
                    "kefuUrl": $('#kefuUrl').val(),
                    "vipManage": $('#vipManage').val(),
                }, function (data) {
                    if (data.code == 0) {
                        layer.msg(data.msg, {icon: 1, time: 1000}, function () {
                            //xadmin.father_reload();
                            location.reload();
                        });
                    } else {
                        layer.msg(data.msg, {icon: 2, time: 1000}, function () {

                        });
                    }
                });
            });
        });

    });

</script>
</body>

</html>
